package com.agger.eurekacommonapi.service;

import com.agger.eurekacommonapi.hystrix.BaseHystrix;
import com.agger.eurekacommonapi.vo.ResultData;
import com.agger.eurekacommonapi.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @classname: BaseUserController
 * @description: UserController的接口
 * @author chenhx
 * @date 2020-04-23 10:11:25
 */
@FeignClient(value = "eureka-client-user-service",path = "/user",fallback = BaseHystrix.class)
public interface BaseUserController {


    @GetMapping("/hello/{name}")
    String sayHello(@PathVariable("name") String name);

    @GetMapping("/queryUser")
    String queryUser(@RequestParam String name);

    @GetMapping("/queryUserById")
    String queryUserById(@RequestParam String id);

    @PostMapping("/addUser")
    ResultData addUser(@RequestBody UserVO user);
}
